package com.wn32.main.demo6;

public class Main2 {
    public static void main(String[] args) {
        Runnable runnable=new Runnable(){
            @Override
            public void run() {
                for (int i = 0; i <10 ; i++) {
                    System.out.println(Thread.currentThread().getName()+":"+i);
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        };
        Thread th1=new Thread(runnable);
        th1.start();

        System.out.println(Thread.currentThread().getName()+":蜗牛学院");
    }
}
